lib = libmyfunc.so

$(lib):mymath.o
	gcc -shared -o $@ $^
mymath.o:mymath.c
	gcc -fPIC -c $^

.PHONY:clean
clean:
	rm -rf *.so *.o lib

.PHONY:output
output:
	mkdir -p lib/include
	mkdir -p lib/mylib
	cp *.h lib/include
	cp *.so lib/mylib